function Bakground(context) {
	this.context = context;
	var position = context.container.position();
	this.view = context.paper.rect(0, 0, context.container.width() - 1, context.container.height() - 1).attr(this.style);
	this.gridVisuable = true;

	// 绑定数据，供其他地方使用
	this.view.data("_bakground", this);
	this.view.getData = function() {
		return this.data("_bakground");
	};
	this.BindMousemove();
	this.BindMousedown();
	this.bindDblclick();
	this.bindClick();
	if (!context.readOnly) {
		$(this.view.node).contextMenu({
			menu: 'processMenu'
		}, function(action, el, pos) {
			if (action == "select") {
				context.create('');
			}
			this.context.menuClick("process", "edit", this.context);
		});
	}

};
Bakground.prototype.style = {
	fill : "#FFFFFF",
	"opacity" : 0
};

Bakground.prototype.BindMousemove = function() {
	this.view.mousemove(function(event) {
		var x = event.offsetX || event.layerX || 0;
		var y = event.offsetY || event.layerY || 0;
		this.getData().context.update(x, y);
	});
};

Bakground.prototype.BindMousedown = function() {
	this.view.mousedown(function(event) {
		if (event.button != 2) {
			if (this.getData().context.command == "line" && this.getData().context.commandObject != null) {
			//this.getData().context.commandObject.remove();
			} else if (this.getData().context.command != null) {
				this.getData().context.setCommandObject(CommandCreateNode(this.getData().context));
			}
		}
		context.removeTransitionHotPoint();
	});
};
Bakground.prototype.bindMouseup = function() {
};
Bakground.prototype.bindClick = function() {
	this.view.click(function(event) {
		var x = event.offsetX || event.layerX || 0;
		var y = event.offsetY || event.layerY || 0;
		if (this.getData().context.command == "line" && this.getData().context.commandObject != null) {
			this.getData().context.commandObject.appendPoint(x, y);
		}
		context.removeTransitionHotPoint();
	});

};
Bakground.prototype.bindDblclick = function() {
	this.view.dblclick(function(event) {
		if (this.getData().context.commandObject != null) {
			this.getData().context.commandObject.remove();
		}
	});
};
